package com.tfkj.service;

import com.tfkj.entity.*;
import com.tfkj.vo.*;

import java.time.LocalDate;
import java.util.List;

public interface AllService {
    List<Student> findAllUser(String role, String className, String name, Integer pageNum, Integer pageSize);

    Integer insertStudentImageRel(InsertRelVO rel);

    Integer updateStudentImageRel(Integer isError, Integer id);

    Student login(String studentNum, String password);

    List<ImageWithGradeAndSubjectVO> findImage(Integer testId);
    Integer createImage(Integer testId, String url, Integer sortNum, Integer pageNum,String position, Double width, Double height, String resultPosition);

    List<QuestionType> findQuestionType();


    List<Test> getTests(String name, Integer pageNum, Integer pageSize);
    Integer updateTest(int id, String name, String grade, String subject);
    Integer updateTestUrls(Integer id, String urls);
    Integer createTest(String name, String grade, String subject, String urls, String type, String testNum);
    Integer insertTestWithId(Integer id, String name, String grade, String subject, String urls);


    List<RelShowVO> findErrorList(String studentNum, String grade, String className, String subject, List<String>  questionTypes, Integer difficulty, Integer pageNum, Integer pageSize, LocalDate startTime, LocalDate endTime);

    void deleteTest(Integer id);

    Integer updateUser(String studentNum, String password, String oldPassword);

    void deleteStudentImageRel(Integer id);

    void deleteQuestion(Integer id);

    Integer getTestsTotal(String name);

    Integer getStudentTotal(String role, String className, String name);


    Integer findErrorListTotal(String studentNum, String grade, String className, String subject, List<String> questionTypes, Integer difficulty, LocalDate startTime, LocalDate endTime);

    void deleteQuestionType(Integer id);

    void createQuestionType(QuestionType questionType);

    QuestionEnumerationVO findQuestiontypeEnumeration();

    void insertQuestions(List<Question> questionList);

    void createUser(Student student);

    void updateUserInfo(String studentNum, String phone, String email);

    void createImage(List<CreateImageVO> imageList, Integer testId);

    List<String> findGrade();

    List<String> findSubject(String grade);

    List<Question> findQuestionWithSubject(String grade, String subject,  Integer pageNum, Integer pageSize);

    Integer findQuestionWithSubjectTotal(String grade, String subject);

    List<QuestionType> findQuestionType(String grade, String subject);

    List<String> findUrls(List<Integer> ids, String type);

    Integer findMaxTestId();

    void suggestion(String teacherNum, String questionIds, String className);

    List<QuestionSuggestionVO> suggestionSearch(String className, String teacherNum, LocalDate createDate);

    List<Student> findTeacherList(String className);

    List<Question> findQuestion(String grade, String subject, String questionType, Integer difficulty, Integer pageNum, Integer pageSize);

    Integer findQuestionTotal(String grade, String subject, String questionType, Integer difficulty);

    List<Question> findQuestionRandom(String grade, String subject, String questionType, Integer difficulty);

    Integer updateImage(Integer id, String grade, String subject, String questionType, Integer difficulty, String result);

    Integer updateQuestion(Integer id, String grade, String subject, String questionType, Integer difficulty);

    List<String> findUrlsWithSuggestion(List<Integer> ids, String type, Integer suggestionNum);

    Integer updateImageAndSaveQuestion(UpdateImageVO vo);

    void relUpload(List<ExcelUploadVO> uploadVOS);

    List<Student> findAllUser(String studentNum);

    List<RelAndImageVO> findImages(String findUrlStudentStr, LocalDate startDate, LocalDate endDate);

    String findStudentIds(String className);

    List<RelAndImageVO> findSuggestions(String findUrlStudentStr, LocalDate startDate, LocalDate endDate);
}
